Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /** * Request szintű DI scope létrehozása * Middleware ami minden kéréshez új DI scope-ot készít */ function scopeMiddleware(container) { return (req, res, next) => { // TODO 1: Hozz létre request-specifikus scope-ot // Tipp: const scope = container.createScope(); // TODO 2: Tárold el a scope-ot req.scope alatt // Tipp: req.scope = scope; // TODO 3: Hívd meg a next()-et // Tipp: next(); }; } module.exports = scopeMiddleware; |